function r = rem(a, b)
    r = a-fix(a./b).*b
endfunction
